/**
 * @author dumeng
 */
import request from '@/utils/request'
/**
 * 字典
 */
export function getDictByCode(dictCode) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: '/backend/sysDictionary/getDictByCode',
    method: 'POST',
    data: { dictCode }
  })
}

/**
 * 奖品查询
 * @param {*} data
 */
export function query(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/bigTurntablePrize/query',
    method: 'post',
    data
  })
}

/**
 * 新增奖品
 * @param {*} data
 */
export function insert(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/bigTurntablePrize/insert',
    method: 'post',
    data
  })
}

/**
 * 编辑奖品
 * @param {*} data
 */
export function update(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/bigTurntablePrize/update',
    method: 'post',
    data
  })
}

/**
 * 奖品删除
 * @param {*} ids
 */
export function del(ids) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/bigTurntablePrize/deleteByIds',
    method: 'get',
    params: { ids }
  })
}
/**
 * 奖品查询-回显
 * @param {*} data
 */
export function get(id) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/bigTurntablePrize/get',
    method: 'get',
    params: { id }
  })
}

/**
 * 查询金币
 * @param {*} data
 */
export function queryCoins(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/goldPool/query',
    method: 'post',
    data
  })
}

/**
 * 查询优惠卷
 * @param {*} data
 */
export function queryCoupons(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/goldPool/query',
    method: 'post',
    data
  })
}

/**
 * 查询奖品池
 * @param {*} data
 */
export function queryPrizePool(data) {
  return request({
    baseURL: '/API-ENTERPRISE-BACKEND/',
    url: 'backend/prizePool/query',
    method: 'post',
    data
  })
}
